define(["knockout", "durandal/app", 'plugins/router'], function(ko, app, router) {
	var type = ko.observable("");
	var id = ko.observable("");
	var splat = ko.observable("");
	return {
		type: type,
		id: id,
		splat: splat,
		navToDemo1: function() {
			router.navigate('route-demo1')
		},
		navToDemo2: function() {
			debugger;
			var routeStr = 'route-demo2';
			if(this.type() !== '') {
				routeStr += '/' + this.type();
			} else {
				return;
			}
			if(this.id() !== '') {
				routeStr += '/' + this.id();
			}
			router.navigate(routeStr);
		},
		navToDemo3: function() {
			debugger;
			var routeStr = 'route-demo3';
			if(this.splat() !== '') {
				routeStr += '/' + this.splat();
			}
			router.navigate(routeStr);
		},
		activate: function() {

		},
		binding: function() {

		},
		bindingComplete: function() {

		},
		attached: function() {

		},
		compositionComplete: function() {

		},
		detached: function() {

		}
	}
})